<% # @page_title="Host Information" %>
<% @mselect_hostinfo=1 %>
<% @table = @host_infos %>
<% @action = "index" %>
<% @cont = "host_infos" %>

<%= render :partial => 'layouts/page_count' %>

<table>
<thead>
  <tr>
    <th scope="col">      
      <%= sort_link("Test Area", "session_test_area") %>
      <%= filterx_icon("Remove filter on #{session[:test_area]}", session[:test_area], :test_area, {:controller => 'test_areas', :action => 'set', :id => 'all'}) %>
    </th>

    <th scope="col"><%= sort_link("Host", "ip_address") %>
      <%= filterx_icon("Remove filter on host", @url_params[:host_id_v], :host_id_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Key Name", "key") %>
      <%= filterx_icon("Remove filter on #{@url_params[:key_v]}", @url_params[:key_v], :key_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Value", "value") %>
      <%= filterx_icon("Remove filter on #{@url_params[:value_v]}", @url_params[:value_v], :value_v, {:controller => @cont}) %>
    </th>
  </tr>
</thead>

<tbody>
<%
odd_or_even = 0
for host_info in @host_infos
    odd_or_even = 1 - odd_or_even
%>
  <tr class="odd<%=h odd_or_even %>">
    <td>
       <%=h host_info.test_area_name %>
       <%= filter_icon("Show only #{host_info.test_area_name}", session[:test_area], {:controller => 'test_areas', :action => 'set', :id => host_info.test_area_id}) %>
    </td>

    <td><%= link_to_host(host_info.ip_address, {:controller => "hosts", :action => "showhostinfo", :id => host_info.host_id}) %></td>

    <td>
       <%=h host_info.key %> 
       <%= filter_icon("Show only #{host_info.key}", @url_params[:key_v], {:controller => 'host_infos', :key_v => host_info.key}) %>
    </td>

    <td>
       <%=h yt_truncate(host_info.value,100) %>
       <%= filter_icon("Show only #{host_info.value}", @url_params[:value_v], {:controller => 'host_infos', :value_v => host_info.value}) %>
    </td>
  </tr>
<% end %>
</tbody>
</table>

<%= render :partial => 'layouts/page_count' %>
